package com.graduation.springbootinit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.graduation.springbootinit.model.entity.ActivityPart.QuizChallenge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface QuizChallengeMapper extends BaseMapper<QuizChallenge> {
    
    @Select("SELECT * FROM community_activities_quiz_challenge WHERE status = 1 ORDER BY created_at DESC")
    Page<QuizChallenge> selectOngoingChallenges(Page<QuizChallenge> page);
} 